<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 27/9/2017
 * Time: 上午 10:36
 */

namespace app\common\validate;


use think\Validate;

class BisLocation extends Validate
{
    protected $rule=[
        'id'=> 'number',
        'name'=> 'require',
        'logo'=> 'require',
        'adress'=> 'require',
        'tel'=> 'number',
        'contact'=> 'require',
        'xpoint'=> 'require',
        'ypoint'=> 'require',
        'bis_id'=> 'number',
        'content'=> 'require',
        'is_main'=>'number|in:0,1',
        'api_address' =>'require',
        'city_id'=> 'number',
        'city_path'=> 'require',
        'category_id'=> 'number',
        'category_path'=> 'require',
        'bank_info'=> 'require',
        'listorder'=> 'number',
        'status'=> 'number|in:-1,0,1,2',
        'open_time' => 'require',
    ];
    protected $scene=[
        'add'=>['tel','contact','category_id','address','open_time'],
        'status'=>['bis_id','status'],
    ];
}